package com.itheima.health.mapper;

import com.github.pagehelper.Page;
import com.itheima.health.model.entity.CheckItem;
import com.itheima.health.model.vos.CheckItemVo;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 这个类是：
 *
 * @author: 25122
 * @date: 2024/6/2 19:27
 * @version: 1.0
 */
@Mapper
public interface CheckItemMapper {
    Page<CheckItem> page(@Param("queryString") String queryString);

    void addCheckItem(CheckItem checkItem);

    @Select("select * from health.t_checkitem where id = #{id}")
    CheckItemVo findCheckItemById(Integer id);

    void updateCheckItem(CheckItem checkItem);

    @Delete("delete from health.t_checkitem where id = #{id}")
    void deleteCheckItemById(Integer id);

    @Select("select * from health.t_checkitem")
    List<CheckItemVo> findAllCheckItem();
}
